{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Trellis Area\n",
    "-----------------\n",
    "This example shows stock prices of four large companies as a small multiples of area charts.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "import altair as alt\n",
    "alt.data_transformers.enable('json')\n",
    "from altair.expr import datum\n",
    "from vega_datasets import data\n",
    "\n",
    "source = data.stocks()\n",
    "\n",
    "alt.Chart(source).mark_area().encode(\n",
    "    alt.X('date:T', axis=alt.Axis(format='%Y', title='Time', grid=False)),\n",
    "    alt.Y('price:Q', axis=alt.Axis(title='Price', grid=False)),\n",
    "    alt.Color('symbol', legend=None),\n",
    "    alt.Row('symbol:N', header=alt.Header(title='Symbol'))\n",
    ").properties(\n",
    "    width=300,\n",
    "    height=40\n",
    ").transform_filter(\n",
    "    datum.symbol != 'GOOG'\n",
    ")\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "env": {},
   "interrupt_mode": "signal",
   "language": "python",
   "metadata": {},
   "name": "python3"
  },
  "language": "python"
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
